﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HZ.Supervise.Web.Secondphase
{
    public partial class CompanyList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindList();
        }
        void BindList()
        {
            DataTable dt = new DataTable();
            DataColumn dc1 = new DataColumn("companyName", typeof(string)); dt.Columns.Add(dc1);
            DataColumn dc2 = new DataColumn("RegAdress", typeof(string)); dt.Columns.Add(dc2);
            DataColumn dc3 = new DataColumn("Layer", typeof(string)); dt.Columns.Add(dc3);
            DataColumn dc4 = new DataColumn("Mantary", typeof(string)); dt.Columns.Add(dc4);
            DataColumn dc5 = new DataColumn("Mobile", typeof(string)); dt.Columns.Add(dc5);
            DataColumn dc6 = new DataColumn("Email", typeof(string)); dt.Columns.Add(dc6);
            for (int i = 0; i < 10; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = "昆明第" + i.ToString() + "医院";
                dr[1] = "云南";
                dr[2] = "张" + i.ToString();
                dr[3] = "李" + i.ToString();
                dr[4] = "13611516373";
                dr[5] = "dongmingzhi2009@126.com";

                dt.Rows.Add(dr);
            }
            gvwCompany.DataSource = dt;
            gvwCompany.DataBind();
        }

        protected void btnQuery_Click(object sender, EventArgs e)
        {
            AspNetPager1.CurrentPageIndex = 1;
            BindList();
        }
    }
}
